import Vue from "vue";
import VueRouter from "vue-router";
Vue.use(VueRouter);

const routes = [
  {
    path: "/sign/index",
    name: "Index",
    component: resolve => require(["@/views/Index.vue"], resolve),
    meta: {
      keepAlive: false // 不需要被缓存
    }
  },
  {
    path: "/sign/index/basic",
    name: "IndexBase",
    component: resolve => require(["@/components/Index.vue"], resolve),
    meta: {
      keepAlive: false
    }
  },
  {
    path: "/sign/index/face",
    name: "IndexFace",
    component: resolve => require(["@/components/face.vue"], resolve),
    meta: {
      keepAlive: false
    }
  },
  {
    path: "/sign/index/signUp",
    name: "IndexSign",
    component: resolve => require(["@/components/signUp.vue"], resolve),
    meta: {
      keepAlive: false
    }
  },
  {
    path: "/sign/index/404",
    component: resolve => require(["@/views/error/404"], resolve),
    hidden: true
  },
  {
    path: "/sign/index/timeOut",
    component: resolve => require(["@/views/error/timeOut"], resolve),
    hidden: true
  },
  { path: "*", component: resolve => require(["@/views/Index.vue"], resolve) }
];

const router = new VueRouter({
  routes
});

export default router;
